/*
 * @Author: your name
 * @Date: 2021-02-06 22:02:40
 * @LastEditTime: 2021-02-16 15:21:37
 * @LastEditors: Please set LastEditors
 * @Description: 酷我音乐各种接口
 * @FilePath: \Music\server\API\Kuwo.js
 */
import request from '../api/request'

/**
 * @description: 酷我音乐关键词搜索
 * @param {*} keyword 关键词
 * @param {*} page 1+ 页码
 * @param {*} pagesize 分页大小
 * @return {*}
 */
export function searchFromKuWo(keyword, page, pagesize) {
  return request({
    method: 'get',
    url: '/kuwo/search',
    params: {
      keyword,
      page,
      pagesize
    }
  })
}

/**
 * @description: 根据id获取歌曲信息
 * @param {*} id 歌曲id
 * @return {*}
 */
export function getMusicInfoFromKuWo(id) {
  return request({
    method: 'get',
    url: '/kuwo/getMusicInfo',
    params: {
      id
    }
  })
}


/**
 * @description: 根据id获取歌曲链接
 * @param {*} id 歌曲id
 * @return {*}
 */
export function getMusicUrlFromKuWo(id) {
  return request({
    method: 'get',
    url: '/kuwo/getMusicUrl',
    params: {
      id
    }
  })
}
